package com.centriole.service.workflow.entity;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.util.Date;

public class BaseEntity implements Serializable{
	private static final long serialVersionUID = -8754236700900391819L;
	private String id;
	private String addWhoName;
	private String editWhoName;
	private String state;
	private Date createDate;
	private Date editDate;
	private String createDateStr;
	private String editDateStr;
	private String proNameStr;
	
	/*
	   `creatorId` char(32) COLLATE utf8_bin NOT NULL COMMENT '创建人ID。与用户表的userId对应',
  `createTime` datetime NOT NULL COMMENT '创建时间',
  `modifierId` char(32) COLLATE utf8_bin NOT NULL COMMENT '修改人ID。与用户表的userId对应',
  `modifyTime` datetime NOT NULL COMMENT '修改时间',
	 */
	private String creatorId;
	private Date createTime;
	private String modifierId;
	private Date modifyTime;

	
	public String getProNameStr() {
		return proNameStr;
	}
	public void setProNameStr(String proNameStr) {
		this.proNameStr = proNameStr;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getAddWhoName() {
		return addWhoName;
	}
	public void setAddWhoName(String addWhoName) {
		this.addWhoName = addWhoName;
	}
	public String getEditWhoName() {
		return editWhoName;
	}
	public void setEditWhoName(String editWhoName) {
		this.editWhoName = editWhoName;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Date getEditDate() {
		return editDate;
	}
	public void setEditDate(Date editDate) {
		this.editDate = editDate;
	}
	public String getCreateDateStr() {
		return createDateStr;
	}
	public void setCreateDateStr(String createDateStr) {
		this.createDateStr = createDateStr;
	}
	public String getEditDateStr() {
		return editDateStr;
	}
	public void setEditDateStr(String editDateStr) {
		this.editDateStr = editDateStr;
	}
	public Serializable getPk() {
        return this.id;
    }
	
    public String getCreatorId() {
		return creatorId;
	}
	public void setCreatorId(String creatorId) {
		this.creatorId = creatorId;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getModifierId() {
		return modifierId;
	}
	public void setModifierId(String modifierId) {
		this.modifierId = modifierId;
	}
	public Date getModifyTime() {
		return modifyTime;
	}
	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof BaseEntity)) return false;
        final BaseEntity object = (BaseEntity) o;
        return new EqualsBuilder().append(getPk(), object.getPk()).isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder(17, 37).append(this.getPk()).toHashCode();
    }
}
